package com.situ.day5;
//The type Student cannot subclass the final class Person
public class Student extends Person {
	private String className;
	
	public Student() {
		super();//调用父类无参构造方法new Person();
	}

	public Student(Integer id, String name, Integer age) {
		super(id, name, age);//调用父类有参构造方法new Person(id, name, age);
		this.className = className;
	}

	/*public Student() {
	}
	
	public Student(Integer id, String name, Integer age, String className) {
		this.id = id;
		this.name = name;
		this.age = age;
		this.className = className;
	}*/

	@Override // 重写、覆盖
	public void show() {
		System.out.println("我所在班级是：" + className);
	}

	public void study() {
		System.out.println("Student.study()");
	}

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	@Override
	public String toString() {
		return "Student [className=" + className + "]";
	}
	
}
